import request from '@/utils/request'
export function getRoleListAPI(obj){
    return request({
        url:'park/sys/role',
        method:'GET',
        params:obj
    })
}
export function getTreeListAPI() {
    return request({
      url: 'park/sys/permision/all/tree',
      method:'GET'
    })
  }
export function getRoleDetailAPI(roleId){
  return request({
    url:'/park/sys/role/'+roleId,
    method:'GET'
  })
}
export function getRoleUserAPI(roleId) {
  return request({
    url: `/park/sys/roleUser/`+roleId
  })
}
export function createRoleUserAPI(data) {
  return request({
    url: `/park/sys/role`,
    method: 'POST',
    data:data
  })
}
export function updateRoleAPI(data) {
  return request({
    url: `/park/sys/role`,
    method: 'PUT',
    data:data
  })
}
export function delRoleUserAPI(roleId) {
  return request({
    url: `/park/sys/role/`+roleId,
    method: 'DELETE'
  })
}